#ifndef _CTURRET_H_
#define _CTURRET_H_

#include "CEnemy.h"
#include "CPlayer.h"
#include "..\SGD_Math.h"
#include "..\Messaging\IListener.h"

class CTurret : public CEnemy, public IListener
{
private:
	//tVector2D	m_tStartPos;
	//tVector2D	m_tToPlayer;
	float		m_fFireTimer; // ROF for turrets
	int imageid;
public:
	tVector2D gunpoint;
	CTurret(void);
	~CTurret(void);

	//tVector2D GetStartVector() { return m_tStartPos; }
	//tVector2D GetPlayerVector() { return m_tToPlayer; }
	//void SetStartVector(float fPosX, float fPosY);
	//void SetPlayerVector(float fPosX, float fPosY);

	//CPlayer* GetPlayer() {return CPlayer::GetInstance();}
	void Fire(void);
	void Update(float fElapsedTime);
	void Render(void);
	float rad;

	RECT GetCollisionRect(void);
	bool CheckCollision(IBaseInterface* IBase);

	// Listen for events
	void HandleEvent(CEvent* pEvent);
};

#endif